/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ing.sisval.main;

/**
 *
 * @author Mysham
 */
//import org.diresa.inventri.gui.seguridad.JF_Loguin;

import org.ing.sisval.gui.seguridad.JFAcceso;
import org.rx.cr.db.DBA;
import org.rx.cr.util.gui.AdminIntall;

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(final String[] args) {
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">        
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        // TODO code application logic here
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                DBA.selectMYSQL();
                JFAcceso acceso = new JFAcceso();
               
                AdminIntall adminIntall = new AdminIntall(acceso, "SISVAL");
                acceso.setConfig(adminIntall.getConf());
                adminIntall.setTableTest("SISVAL.personal");
               if ((args != null && args.length > 0 && args[0].equals("-s")) || (adminIntall.getConf() == null)) {
                    adminIntall.setVisible(true);
                } else if (acceso.getConfig()!= null) {
                    acceso.setVisible(true);
                }
            }
        });
                }



}

